<template>
  <div class="mui-card"
       @click='$emit("todetail",item.id)'>
    <div class="mui-card-header mui-card-media"
         :style="'background-image:url('+ item.news_img +')'"></div>
    <div class="mui-card-content">
      <div class="mui-card-content-inner">
        <p>{{ item.title }}</p>
        <p style="color: #F6A623;">{{ item.detail }}</p>
      </div>
    </div>
    <div class="mui-card-footer">
      <a class="mui-card-link">查看详情 <img class='image_icon  right_icon'
             src="/static/images/news/right.png"
             alt=""></a>
      <!-- <a class="mui-card-link">Read more</a> -->
    </div>
  </div>
</template>

<script>
// 图文卡片组件
export default {
  props: ['item']
}
</script>

<style lang='scss' scoped>
// 图文卡片
.mui-card {
  font-size: 14px;
  position: relative;
  overflow: hidden;
  // margin: 10px;
  border-radius: 2px;
  background-color: #fff;
  background-clip: padding-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  .mui-card-header.mui-card-media {
    display: block;
    padding: 10px;
    height: 286rpx;
  }
  .mui-card-media {
    vertical-align: bottom;
    color: #fff;
    background-position: center;
    background-size: cover;
  }
  .mui-card-header {
    font-size: 17px;
    border-radius: 2px 2px 0 0;
  }
  .mui-card-footer,
  .mui-card-header {
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    min-height: 44px;
    padding: 10px 15px;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
  }
  .mui-card-content {
    font-size: 14px;
    position: relative;
    .mui-card-content-inner {
      position: relative;
      padding: 15px;
      p {
        font-size: 14px;
        margin-top: 0;
        margin-bottom: 10px;
        color: #333;
      }
    }
  }
  .mui-card-footer {
    color: #6d6d72;
    border-radius: 0 0 2px 2px;
    &:before {
      position: absolute;
      top: 0;
      right: 0;
      left: 0;
      height: 1px;
      content: '';
      -webkit-transform: scaleY(0.5);
      transform: scaleY(0.5);
      background-color: #e4e4e4;
    }
  }

  .mui-card-footer .mui-card-link,
  .mui-card-header .mui-card-link {
    line-height: 44px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    height: 44px;
    margin-top: -10px;
    margin-bottom: -10px;
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    text-decoration: none;
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
  }
  .right_icon {
    margin-left: 15rpx;
    width: 11rpx;
    height: 20rpx;
  }
}
</style>